//
//  BBFouncCollectionCell.m
//  BearSiX
//
//  Created by Tom on 16/3/25.
//  Copyright © 2016年 Tom. All rights reserved.
//

#import "BBFouncCollectionCell.h"
#define Founcell_width (WINSIZEWIDTH-2*3)/4
#define Founcell_height WINSIZEWIDTH/3.5
// [flowLayout setItemSize:CGSizeMake((WINSIZEWIDTH-2*3)/4, WINSIZEWIDTH/3.5)]
@implementation BBFouncCollectionCell
-(UIImageView *)imageView{

    if (!_imageView) {
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake((Founcell_width-Founcell_width/3.8)/2, (Founcell_width-Founcell_width/3.8)/2.3-WINSIZEWIDTH/85, Founcell_width/3, Founcell_width/3)];
        _imageView.centerX = Founcell_width/2;
       // _imageView.backgroundColor = [UIColor brownColor];
    }
    return _imageView;
}
-(UILabel *)itemLabel{

    if (!_itemLabel) {
        _itemLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.imageView.frame), Founcell_width, Founcell_width/2.4)];
        _itemLabel.textAlignment = NSTextAlignmentCenter;;
        _itemLabel.font = [UIFont systemFontOfSize:WINSIZEWIDTH/25];
        _itemLabel.textColor = [UIColor blackColor];
    }
    return _itemLabel;
}
-(UILabel *)itemSecLabe{

    if (!_itemSecLabe) {
        _itemSecLabe = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.imageView.frame)+WINSIZEWIDTH/15, Founcell_width, WINSIZEWIDTH/20)];
        _itemSecLabe.textColor = [UIColor colorWithHexString:@"f01335"];
        _itemSecLabe.font = [UIFont systemFontOfSize:WINSIZEWIDTH/28];
        _itemSecLabe.textAlignment = NSTextAlignmentCenter;
    }
    return _itemSecLabe;
}
-(instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self createUI];
    }
    return self;
}
-(void)createUI{
    [self addSubview:self.imageView];
    [self addSubview:self.itemLabel];
    [self addSubview:self.itemSecLabe];
}



@end
